<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

	<head>

		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<title>工单列表</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<link rel="shortcut icon" href="favicon.ico">
		<link href="/Application/Admin/View//Public/static/css/bootstrap.min.css" rel="stylesheet">
		<link href="/Application/Admin/View//Public/static/css/font-awesome.css" rel="stylesheet">
		<link href="/Application/Admin/View//Public/static/css/plugins/iCheck/custom.css" rel="stylesheet">
		<link href="/Application/Admin/View//Public/static/css/animate.css" rel="stylesheet">
		<link href="/Application/Admin/View//Public/static/css/style.css" rel="stylesheet">
		<style>
			.dropdown-menu {
				width: 70px;
				min-width: 70px;
				border-radius: 5px;
			}
			
			.dropdown-menu>li>a {
				margin: 0;
			}
			
			#ov {
				display: inline-block;
				max-height: 70px;
				overflow: hidden;
			}
			.ch{display: block;width: 300px;height: 38px;overflow: hidden;float: left;}
			.cd{display: block;float: left;color: blue!important;line-height: 38px;}
		</style>
	</head>

	<body class="fixed-sidebar full-height-layout gray-bg  pace-done">
		<nav class="navbar-default navbar-static-side" role="navigation">
	<div class="nav-close"><i class="fa fa-times-circle"></i></div>
	<div class="sidebar-collapse">
		<ul class="nav" id="side-menu">
			<li class="nav-header">
				<div class="dropdown profile-element">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#">
						<span class="clear">
                                    <span class="block m-t-xs" style="font-size:20px;">
                                        <i class="fa fa-area-chart"></i>
                                        <strong class="font-bold">管理系统</strong>
                                    </span>
						</span>
					</a>
				</div>
				<div class="logo-element">管理系统</div>
			</li>
			<li>
				<a class="J_menuItem" href="<?php echo U('index/index');?>">
					<i class="fa fa-home"></i>
					<span class="nav-label">主页</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('member/index');?>">
					<i class="fa fa-user"></i>
					<span class="nav-label">会员管理</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('admin/index');?>">
					<i class="fa fa-users"></i>
					<span class="nav-label">后台用户</span>
				</a>

			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('list/index');?>">
					<i class="fa fa-folder"></i>
					<span class="nav-label">应用列表</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('Config/index');?>">
					<i class="fa fa-cogs"></i>
					<span class="nav-label">网站配置</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('jubao/index');?>">
					<i class="fa fa-envelope-o"></i>
					<span class="nav-label">举报信箱</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('ticket/index');?>">
					<i class="fa fa-file-o"></i>
					<span class="nav-label">工单列表</span>
				</a>
			</li>




			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('Articles/advertisement');?>">
					<i class="fa fa-file-o"></i>
					<span class="nav-label">广告</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('Download/index');?>">
					<i class="fa fa-file-o"></i>
					<span class="nav-label">套餐设置</span>
				</a>
			</li>
		</ul>
	</div>
</nav>
		<div id="wrapper">
			<div id="page-wrapper" class="gray-bg dashbard-1" style="height: auto;">
				<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
	<ul class="nav navbar-top-links navbar-right">
		<li class="dropdown">
			<a href="<?php echo U('login/delcache');?>" class="dropdown-toggle count-info"><i class="fa fa-check"></i> 清除缓存</a>
		</li>
		<li class="dropdown">
			<a href="<?php echo U('login/logout');?>" class="dropdown-toggle count-info"><i class="fa fa-power-off"></i> 退出</a>
		</li>
	</ul>
</nav>
				<div class="row border-bottom">
					<div class="col-sm-12 animated fadeInRight">
						<div class="mail-box-header">
							<h2><a href="<?php echo U('jubao/index');?>">所有工单</a></h2>
						</div>
						<div class="mail-box">
							<table class="table table-hover table-mail">
								<tbody>
									<tr>
										<th class="col-lg-1">ID</th>
										<th class="col-lg-2">用户</th>
										<th class="col-lg-1">问题分类</th>
										<th class="col-lg-1">提交时间</th>
										<th class="col-lg-2" style="text-align: center;">状态</th>
										<td class="col-lg-3">内容</td>
										<th class="col-lg-2">操作</th>
									</tr>
									<?php if(is_array($member)): foreach($member as $key=>$v): ?><tr class="unread">
											<td>
												<input type="checkbox" class="i-checks" name="hobby[]" value="<?php echo ($v["id"]); ?>"><?php echo ($v["id"]); ?>
											</td>
											<td><?php echo (getName($v["userid"])); ?></td>
											<td><?php echo ($v["typename"]); ?></td>
											<td><?php echo ($v["addtime"]); ?></td>
											<td style="text-align: center;">
												<?php if($v["status"] == 0): ?><span>等待回复</span>
													<?php else: ?><span style="color: green;">已回复</span><?php endif; ?>
											</td>
											<td>
												
													<span class="ch"><?php echo ($v["desc"]); ?></span>
													<a href="javascript:;" class="cd">查看全部</a>
											</td>
											<td>
												<div class="input-group-btn">
													<button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" style="background: #fc3d39;color: #FFFFFF;border-radius:5px;width: 70px;">操作 <span class="caret"></span>
                                            </button>
													<ul class="dropdown-menu">
														<li>
															<a href="<?php echo U('ticket/update',array('id'=>$v['id']));?>">回复</a>
														</li>
														<li>
															
														</li>
														</li>
													</ul>
												</div>
												<!--<a href="<?php echo U('ticket/update',array('id'=>$v['id']));?>" style="color: #337ab7;">回复</a>-->
											</td>

										</tr><?php endforeach; endif; ?>
								</tbody>
							</table>
							<div style="overflow:hidden;padding:20px 12px;">
							<span>

							</span>
							<?php echo ($page); ?>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!-- 全局js -->
		<script src="/Application/Admin/View//Public/static/js/jquery.min.js"></script>
		<script src="/Application/Admin/View//Public/static/js/bootstrap.min.js"></script>

		<!-- 自定义js -->
		<script src="/Application/Admin/View//Public/static/js/content.js"></script>

		<!-- iCheck -->
		<script src="/Application/Admin/View//Public/static/js/plugins/iCheck/icheck.min.js"></script>
		<script>
			$(document).ready(function() {
				$('.i-checks').iCheck({
					checkboxClass: 'icheckbox_square-green',
					radioClass: 'iradio_square-green',
				});
				var checkAll = $('#quanxuan'); //全选的input
				var checkboxs = $('.i-checks'); //所有单选的input

				checkAll.on('ifChecked ifUnchecked', function(event) {
					if(event.type == 'ifChecked') {
						checkboxs.iCheck('check');
					} else {
						checkboxs.iCheck('uncheck');
					}
				});
				checkboxs.on('ifChanged', function(event) {
					if(checkboxs.filter(':checked').length == checkboxs.length - 1) {
						checkAll.prop('checked', true);
					} else {
						checkAll.prop('checked', false);
					}
					checkAll.iCheck('update');
				})

							$(".cd").click(function(){
    	if($(this).prev().height()==38){
    		$(this).prev().height(100);
    		$(this).text("收缩");
    		$(this).css({
    			"height":100+"px",
    			"line-height":100+"px"
    		})
    	   }else{
    		$(this).prev().height(38);
    		$(this).text("查看全部")
    		$(this).css({
    			"height":38+"px",
    			"line-height":38+"px"
    		})
    		}
    	})

			});
		</script>
	</body>

</html>